package com.frxuexi.lib_base.room

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

@Dao
interface UserDao {

    /**
     * 注册
     */
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun register(user: User):Long


    @Query("select * from user where uname= :uname and upass=:upass and role=:role")
    fun login(uname:String,upass:String,role:String):User
}